// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.modules.dao.impl;

import com.liuxinlong.modules.chimi.dto.BarPointsDto;
import com.liuxinlong.modules.dao.BarPointsDao;
import com.liuxinlong.modules.entity.BarPoints;
import com.liuxinlong.modules.mapper.BarPointsMapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 类描述
 * <p>
 * 此类关联设计的功能
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022年7月20日
 */
@Service
public class BarPointsDaoImpl extends ServiceImpl<BarPointsMapper, BarPoints> implements BarPointsDao {

    @Override
    public void updatePoint(String userId, int operateType, int points) {
        baseMapper.updatePoint(userId, operateType, points);
    }

    @Override
    public List<BarPointsDto> queryTopTen() {
        return baseMapper.queryTopTen();
    }

    @Override
    public List<BarPoints> getAllUserPoints() {
        return baseMapper.getAllUserPoints();
    }

    @Override
    public Map<String, Map<String,String>> getRankMap() {
        return baseMapper.getRankMap();
    }

    @Override
    public List<BarPoints> pagePointsRanking(Map<String, Object> queryParam) {
        return baseMapper.pagePointsRanking(queryParam);
    }

    @Override
    public int getPointsRankingCount(Map<String, Object> queryParam) {
        return baseMapper.getPointsRankingCount(queryParam);
    }
}
